class HomePublicLesso {
  int flag;
  String buttonFlag;
  int count;
  String message;
  List<Data> data;

  HomePublicLesso(
      {this.flag, this.buttonFlag, this.count, this.message, this.data});

  HomePublicLesso.fromJson(Map<String, dynamic> json) {
    flag = json['flag'];
    buttonFlag = json['buttonFlag'];
    count = json['count'];
    message = json['message'];
    if (json['data'] != null) {
      data = new List<Data>();
      json['data'].forEach((v) {
        data.add(new Data.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['flag'] = this.flag;
    data['buttonFlag'] = this.buttonFlag;
    data['count'] = this.count;
    data['message'] = this.message;
    if (this.data != null) {
      data['data'] = this.data.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class Data {
  String scheduleDay;
  List<PromotionClassList> promotionClassList;

  Data({this.scheduleDay, this.promotionClassList});

  Data.fromJson(Map<String, dynamic> json) {
    scheduleDay = json['scheduleDay'];
    if (json['promotionClassList'] != null) {
      promotionClassList = new List<PromotionClassList>();
      json['promotionClassList'].forEach((v) {
        promotionClassList.add(new PromotionClassList.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['scheduleDay'] = this.scheduleDay;
    if (this.promotionClassList != null) {
      data['promotionClassList'] =
          this.promotionClassList.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class PromotionClassList {
  int id;
  int key;
  String courseId;
  String name;
  String courseModuleClassBlockName;
  int courseModuleClassBlockId;
  StatusCode statusCode;
  StatusCode modeCode;
  String imgUrl;
  String pcImgUrl;
  bool isappointment;
  int appointmentNum;
  int resourceTeacherId;
  String resourceTeacherName;
  String scheduleDay;
  String startTime;
  String endTime;
  String introduce;
  String image;
  int groupId;
  String platformCode;

  PromotionClassList(
      {this.id,
        this.key,
        this.courseId,
        this.name,
        this.courseModuleClassBlockName,
        this.courseModuleClassBlockId,
        this.statusCode,
        this.modeCode,
        this.imgUrl,
        this.pcImgUrl,
        this.isappointment,
        this.appointmentNum,
        this.resourceTeacherId,
        this.resourceTeacherName,
        this.scheduleDay,
        this.startTime,
        this.endTime,
        this.introduce,
        this.image,
        this.groupId,
        this.platformCode});

  PromotionClassList.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    key = json['key'];
    courseId = json['courseId'];
    name = json['name'];
    courseModuleClassBlockName = json['courseModuleClassBlockName'];
    courseModuleClassBlockId = json['courseModuleClassBlockId'];
    statusCode = json['statusCode'] != null
        ? new StatusCode.fromJson(json['statusCode'])
        : null;
    modeCode = json['modeCode'] != null
        ? new StatusCode.fromJson(json['modeCode'])
        : null;
    imgUrl = json['imgUrl'];
    pcImgUrl = json['pcImgUrl'];
    isappointment = json['isappointment'];
    appointmentNum = json['appointmentNum'];
    resourceTeacherId = json['resourceTeacherId'];
    resourceTeacherName = json['resourceTeacherName'];
    scheduleDay = json['scheduleDay'];
    startTime = json['startTime'];
    endTime = json['endTime'];
    introduce = json['introduce'];
    image = json['image'];
    groupId = json['groupId'];
    platformCode = json['platformCode'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['key'] = this.key;
    data['courseId'] = this.courseId;
    data['name'] = this.name;
    data['courseModuleClassBlockName'] = this.courseModuleClassBlockName;
    data['courseModuleClassBlockId'] = this.courseModuleClassBlockId;
    if (this.statusCode != null) {
      data['statusCode'] = this.statusCode.toJson();
    }
    if (this.modeCode != null) {
      data['modeCode'] = this.modeCode.toJson();
    }
    data['imgUrl'] = this.imgUrl;
    data['pcImgUrl'] = this.pcImgUrl;
    data['isappointment'] = this.isappointment;
    data['appointmentNum'] = this.appointmentNum;
    data['resourceTeacherId'] = this.resourceTeacherId;
    data['resourceTeacherName'] = this.resourceTeacherName;
    data['scheduleDay'] = this.scheduleDay;
    data['startTime'] = this.startTime;
    data['endTime'] = this.endTime;
    data['introduce'] = this.introduce;
    data['image'] = this.image;
    data['groupId'] = this.groupId;
    data['platformCode'] = this.platformCode;
    return data;
  }
}

class StatusCode {
  String itemCode;
  String itemValue;
  String type;

  StatusCode({this.itemCode, this.itemValue, this.type});

  StatusCode.fromJson(Map<String, dynamic> json) {
    itemCode = json['itemCode'];
    itemValue = json['itemValue'];
    type = json['type'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['itemCode'] = this.itemCode;
    data['itemValue'] = this.itemValue;
    data['type'] = this.type;
    return data;
  }
}

